package com.qiche.exception;

import com.qiche.enums.ResultEnum;

/**
 * 自定义的系统异常
 * 
 * @author Administrator
 *
 */
public class MySystemException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	private Integer code;
	private String msg;
	private ResultEnum resultEnum;

	public MySystemException(ResultEnum enums) {
		super(enums.getMsg());
		this.code = enums.getCode();
		this.msg=enums.getMsg();
	}
	public MySystemException(String msg) {
		super(msg);
		this.code = 500;
		this.msg=msg;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public ResultEnum getResultEnum() {
		return resultEnum;
	}

	public void setResultEnum(ResultEnum resultEnum) {
		this.resultEnum = resultEnum;
	}
}
